import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';

//列表数据
export const columns: BasicColumn[] = [
   {
    title: '工单号',
    align:"center",
    dataIndex: 'scheduleUuid'
   },
   {
    title: '用户名',
    align:"center",
    dataIndex: 'userName'
   },
   {
    title: '镜像ID',
    align:"center",
    dataIndex: 'imageId'
   },
   {
    title: '拟申请机时(分钟)',
    align:"center",
    dataIndex: 'machineTime'
   },
   {
    title: '拟分配GPU卡数',
    align:"center",
    dataIndex: 'gpuNum'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '审核工单号',
    field: 'scheduleUuid',
    component: 'Input',
    componentProps: {
      disabled:true,
    }
  },
  {
    label: '用户id',
    field: 'userId',
    component: 'Input',
    componentProps: {
      disabled:true,
    }
  },
  {
    label: '此工单对应的镜像ID',
    field: 'imageId',
    component: 'Input',
    componentProps: {
      disabled:true,
    }
  },
  {
    label: '拟申请机时数',
    field: 'machineTime',
    component: 'Input',
    componentProps: {
      disabled:true,
      suffix:"分钟"
    }
  },
  {
    label: '拟分配GPU卡数',
    field: 'gpuNum',
    component: 'Input',
    componentProps: {
      suffix:"张"
    }
  },
  {
    label: '申请事由',
    field: 'reason',
    component: 'InputTextArea',
    componentProps: {
      disabled:true,
    }
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}